home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / CHASSIS_ / MYCLIKLO.C < prev    next >
Text File  |  1992-05-14  |  1KB  |  33 lines

  1. /************************************************************************************/
  2. /*    myClikLoop                                                                        */
  3. /*                                                                                    */
  4. /*    Note:    executed repeatedly when the mouse is held down, and dragged outside of    */
  5. /*            the viewRect                                                            */
  6. /************************************************************************************/
  7.  
  8. #include "MyHeaders.h"
  9.  
  10. pascal Boolean myClikLoop()
  11. {
  12.     int            myClikRetCode;
  13.     Point        myMouseLoc;
  14.     int            vScrollAmt;
  15.  
  16.     myClikRetCode = TRUE;
  17.  
  18.     GetMouse (&myMouseLoc);
  19.     
  20.     GetClip(workRegionH);                                            /* sve clip rgn    */
  21.     ClipRect(&(*windTbl[windSub].windPtr).portRect);                /* reset it        */
  22.  
  23.     if (myMouseLoc.v > (**windTbl[windSub].windTEH[0]).viewRect.bottom)    /* down    */
  24.         myActionProc (windTbl[windSub].windCntlH[0], inDownButton);
  25.     else
  26.     if (myMouseLoc.v < (**windTbl[windSub].windTEH[0]).viewRect.top)    /* up    */
  27.         myActionProc (windTbl[windSub].windCntlH[0], inUpButton);
  28.  
  29.     SetClip(workRegionH);                                            /* restore clip    */
  30.  
  31.     return myClikRetCode;
  32. }
  33.